import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

import {menus} from "@/utils/menus"

const routes = [
  {path:"/",redirect:"/login"},
  {path:"/login",name:"login",component:()=>import("@/views/Login.vue")},
  {path:"/404",name:"notFount",component:()=>import("@/views/errorPage/404.vue")},
  {path:"*",redirect:{name:"notFount"}},
  {path:"/index",
  name:"Index",
  component:()=>import("@/views/Index.vue"),
  children:[
    ...menus
]
},
]

const router = new VueRouter({
  mode: 'hash',
  base: '',
  routes
})

export default router
